# Contributor: mcrmonkey <git@manchestermonkey.co.uk>
# Maintainer: mcrmonkey <git@manchestermonkey.co.uk>
pkgname=ccze
pkgver=0.2.1
pkgrel=0
pkgdesc="A fast log colorizer written in C, intended to be a drop-in replacement for colorize (http://colorize.raszi.hu)"
options="!check" # No testsuite
url="https://github.com/madhouse/ccze"
arch="all"
license="GPL-2.0-only"
makedepends="musl-dev pcre-dev ncurses-dev autoconf automake"
subpackages="$pkgname-dev $pkgname-doc"
source="https://github.com/madhouse/ccze/archive/ccze-$pkgver-2.tar.gz
	001-fix-autoconf.patch
	002-fix-error_t.patch"
builddir="$srcdir/ccze-ccze-$pkgver-2"

prepare() {
	default_prepare
	update_config_guess
	autoreconf -fi
}

build() {
	./configure \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var
	make
}

check() {
	make check
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="b45ae9b0366fa4b0ca37d0aeba66f2fbbe4f6f4f124bfed9828c2324b78092557c64478e15ca592438062d2897b14d6972fc905f72c1a390f9fc8900cfed4436  ccze-0.2.1-2.tar.gz
e869de966de949d270983531c4a2dd7dfcf08e0d9cd390063c128a6316d1f39b1b118bd7c8ad4b589aee468a08d578a5dfdb2c7eeb158926129aaa72fbc8034a  001-fix-autoconf.patch
2100de615d10ac466fe68f2533436d4c7a37bc599eb43489e208d7c5706a400423adc3d8c46dfe5beb1d5e05e8c6709c6318c133fb8b72c467abaaaba39af544  002-fix-error_t.patch"
